The present invention, in some embodiments thereof, relates to modular software architectures and, more specifically, but not exclusively, to a computerized method for untangling cyclic dependencies between components in software architectures.
Software systems tend to suffer from various architectural problems and their modularity deteriorates due to changes and further development processes as they evolve. A major problem that software system architects need to address is cyclic dependencies between different parts of the architecture. Cyclic dependencies may occur when a newly added element (a class, for example, in object oriented languages) is added to a wrong component (package) or due to improper refactoring. Eliminating the cyclic dependencies saves development and/or testing time, preserves better organized system architecture and facilitates reuse of software components.
Various techniques may be used to eliminate manually cyclic dependencies by moving classes between packages or methods between classes and by changing the design of the system such as introducing new interfaces and abstract classes to break the cyclic dependencies.
A simulated-annealing automated approach for resolving the dependencies between two cyclically dependent packages was recently proposed by Abdeen et al in “Automatic Package Coupling and Cycle Minimization”, IEEE Computer Society, 2009, pp 103-112. The approach uses a simulated-annealing based heuristic algorithm to move classes between pairs of packages in order to remove cyclic dependencies between package pairs.